#pragma once
#include "base_detector.h"
#include <onnxruntime_cxx_api.h>
#include <memory>

class OnnxDetector : public BaseDetector {
public:
    OnnxDetector(const std::string& model_path);
    ~OnnxDetector() override;
    std::vector<DetectionResult> detect(const cv::Mat& image) override;
    bool isInitialized() const override { return initialized_; }
protected:
    bool initialized_ = false;
    std::unique_ptr<Ort::Session> session_;
    Ort::Env env_;
    Ort::SessionOptions session_options_;
    std::vector<std::string> class_names_;
    int input_width_ = 640;
    int input_height_ = 640;
    std::string input_name_;
    std::string output_name_;
    // 可根据模型结构调整成员
};
